package com.hudson.pattern.flyweight;

public class Circle {
    private int type;
    private int x;
    private int y;
    private int radius;

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public int getRadius() {
        return radius;
    }

    public void setRadius(int radius) {
        this.radius = radius;
    }

    public Circle(int type) {
        this.type = type;
        System.out.println("创建新对象,type:" + type);
    }

    public void print() {
        System.out.println("Circle{" +
                "type=" + type +
                ", x=" + x +
                ", y=" + y +
                ", radius=" + radius +
                '}');
        System.out.println(this);
    }
}
